package po

//导入SkyPath/internal/domain/user/constant这个路径的下的GenderConstant.go
import constant "SkyPath/internal/domain/user/constant"
import entry "SkyPath/internal/domain/user/entry"

// 写一个用户的实体，包含用户的基本信息：手机号、邮箱、账号、中文名、密码、创建时间、更新时间
type UserPO struct {

	/**
	 * 用户id
	 */
	Id int `json:"id"`

	/**
	 * 姓名
	 */
	Name string `json:"name"`

	/**
	 * 账号
	 */
	Account string `json:"account"`

	/**
	 * 密码
	 */
	Password string `json:"password"`

	/**
	 * 手机号
	 */
	Phone string `json:"phone"`

	/**
	 * 邮箱
	 */
	Email string `json:"email"`

	/**
	 * 性别
	 */
	Gender constant.Gender `json:"gender"`

	/**
	 * 状态
	 */
	Status constant.UserStatus `json:"status"`

	/**
	 * 创建时间
	 */
	CreateTime string `json:"createTime"`

	/**
	 * 修改时间
	 */
	UpdateTime string `json:"updateTime"`
}

// 对相关的属性进行get set方法
func (u *UserPO) GetId() int {
	return u.Id
}

func (u *UserPO) SetId(id int) {
	u.Id = id
}

func (u *UserPO) GetName() string {
	return u.Name
}

func (u *UserPO) SetName(name string) {
	u.Name = name
}

func (u *UserPO) GetAccount() string {
	return u.Account
}

func (u *UserPO) SetAccount(account string) {
	u.Account = account
}

func (u *UserPO) GetPassword() string {
	return u.Password
}

func (u *UserPO) SetPassword(password string) {
	u.Password = password
}

func (u *UserPO) GetPhone() string {
	return u.Phone
}

func (u *UserPO) SetPhone(phone string) {
	u.Phone = phone
}

func (u *UserPO) GetEmail() string {
	return u.Email
}

func (u *UserPO) SetEmail(email string) {
	u.Email = email
}

func (u *UserPO) GetGender() constant.Gender {
	return u.Gender
}

func (u *UserPO) SetGender(gender constant.Gender) {
	u.Gender = gender
}

func (u *UserPO) GetStatus() constant.UserStatus {
	return u.Status
}

func (u *UserPO) SetStatus(status constant.UserStatus) {
	u.Status = status
}

func (u *UserPO) GetCreateTime() string {
	return u.CreateTime
}

func (u *UserPO) SetCreateTime(createTime string) {
	u.CreateTime = createTime
}

func (u *UserPO) GetUpdateTime() string {
	return u.UpdateTime
}

func (u *UserPO) SetUpdateTime(updateTime string) {
	u.UpdateTime = updateTime
}

func (u *UserPO) GetUserPO() *UserPO {
	return u
}

func (u *UserPO) SetUserPO(user *entry.User) *UserPO {
	u.Id = user.Id
	u.Name = user.Name
	u.Account = user.Account
	u.Password = user.Password
	u.Phone = user.Phone
	u.Email = user.Email
	u.Gender = user.Gender
	u.Status = user.Status
	return u
}
